/*
 * Copyright (C) 2010 TopCoder Inc., All Rights Reserved.
 */
package com.hercules.xre.protocol.testing.handlers;

import java.util.List;

/**
 * This interface defines contract to retrieve command strings for the given event type. It has one method:
 * retrieveCommands. A default implementation is provided to retrieve commands from file. It is used by
 * {@link CommandSendingEventHandler} to retrieve commands.
 * <p>
 * <b>Thread safety:</b> Implementation is required to be thread safe.
 *
 * @author bramandia, 7realm
 * @version 1.0
 */
public interface CommandRetriever {
    /**
     * Retrieves commands for the given event type.
     *
     * @param eventType the event type, must not be null
     * @return the list of command strings for the given event type, if there is no such command, empty list will be
     * returned
     * @throws IllegalArgumentException if eventType is null
     * @throws CommandRetrieverException if there is any error during retrieving commands
     */
    List<String> retrieveCommands(EventType eventType) throws CommandRetrieverException;
}
